{include file='public/head'}
<body>
<div class="x-body">
    <table class="layui-table layui-form">
        <thead>
        <tr>
            <th style="width: 80px;text-align:center"></th>
            <th>公司名</th>
            <th style="width: 110px;text-align:center">总容量</th>
            <th style="width: 110px;text-align:center">已使用</th>
            <th>已使用百分比</th>
        </thead>
        <tbody>
        <tr>
            <td style="text-align:center">0</td>
            <td>
                <input type="radio" name="company_id" value="0" title="总公司">
            </td>
            <td style="text-align:center">不限</td>
            <td style="text-align:center">不限</td>
            <td>
                <div class="layui-progress layui-progress-big" lay-showPercent="true">
                    <div class="layui-progress-bar" lay-percent="0"></div>
                </div>
            </td>
        </tr>
        {volist name="company" id="vo"}
        <tr>
            <td style="text-align:center">{$i}</td>
            <td>
                <input type="radio" name="company_id" value="{$vo.id}" title="{$vo.name}">
            </td>
            <td style="text-align:center">
                {$vo.upload_capacity}GB
            </td>
            <td style="text-align:center">{$vo.use_capacity}</td>
            <td>
                <div class="layui-progress layui-progress-big" lay-showPercent="true">
                    <div class="layui-progress-bar" lay-percent="{$vo.bar}"></div>
                </div>
            </td>
        </tr>
        <input type="hidden" id="backtrack" value="{$backtrack}">
        {/volist}
        <tr>
            <td colspan="5">
                <button class="layui-btn" onclick="search()" style="width: 100%">提交保存</button>
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
{include file='public/foot'}
<script type="text/javascript">
    layui.use('element', function(){
        var element = layui.element;
    });
    function search() {
        var company_id = $('input[name="company_id"]:checked ').val();//获取选中的值
        if (!company_id) {
            layer.msg("请选择查看的子公司");
            return false;
        }
        var backtrack = $("#backtrack").val();
        location.href = backtrack + ".html?company_id=" + company_id;
    }
</script>
</html>
